package com.eaoa.uc.account.bo;

import java.util.Date;

import com.eaoa.base.EABaseBusinessObject;
import com.eaoa.dao.pub.PubAccountDAO;
import com.eaoa.vo.pub.PubAccount;

public class EmployeeSessionBO extends EABaseBusinessObject {

	private Long employeeno;

	private String sessionid;

	private PubAccountDAO employeeDAO = new PubAccountDAO();

	public EmployeeSessionBO(Long employeeno, String sessionid) {
		super();
		this.employeeno = employeeno;
		this.sessionid = sessionid;
	}
	

	protected void performBusinessLogic() {

		PubAccount po = (PubAccount) employeeDAO.loadAndLock(employeeno);

		po.setSessionid(sessionid);

		po.setLogindate(new Date());

		employeeDAO.update(po);
	}

}